#include "./log.h"
#include "../build.h"
#include <string.h>
#include "../driver/cmd_uart.h"


using namespace driver;

Log __log;

// void println(const char *format, ...) {
//     va_list ap;
//     va_start(ap, format);
//     cmdUart.printf(format, ap);
// }

void print_log(const char *s, uint8_t len) {
    cmdUart.print_log(s, len);
}

const char HEX_LIST[16] = {
    '0', '1', '2', '3',
    '4', '5', '6', '7',
    '8', '9', 'A', 'B',
    'C', 'D', 'E', 'F'
};

uint8_t str_copy(char *buf, const char *str) {
    uint8_t len = 0;
    while (str[len] != '\0') {
        buf[len] = str[len];
        len += 1;
    }
    return len;
}


